package de.jmda.gen.template;

import java.util.Map;

public abstract class AbstractBinder
{
	public abstract Map<String, String> getBinding();

	public String bind(String string)
	{
		Map<String, String> binding = getBinding();

		for (String placeholder : binding.keySet())
		{
			string = string.replaceAll(placeholder, binding.get(placeholder));
		}

		return string;
	}
}